# #1.计算输入字符串。。。。空个数,,,
# def count_func(str1):
#     digit_num = 0
#     space_num = 0
#     alpa_num = 0
#     else_num = 0
#     for s in str1:
#         if str.isdigit(s):
#             digit_num += 1
#         elif str.isalpha(s):
#             alpa_num += 1
#         elif str.isspace(s):
#             space_num += 1
#         else:
#             else_num += 1
#     print(f"数字有{digit_num}个，字母有{alpa_num}个，空格有{space_num}个，其他有{else_num}个")
# count_func('asdsad2335645  5asd4sa/.//./.')
from sympy import false
from torch.backends.cuda import flash_sdp_enabled


# #2.
# def len_func(l):
#     if len(l) > 5:
#         print(True)
#     else:
#         print(False)
# len_func([1,2,3,4])
#
# len_func('asd12 s')
#
# len_func((1,2,3,4,5,6))

# #3.
# def is_haveempty(s,l,z):
#     for char in s:
#         if char == ' ' or char == '':
#             print("字符串中有空内容！")
#     for i in l:
#         if i == ' ' or i == '':
#             print("列表中有空内容！")
#     for x in z:
#         if x == ' ' or x == '':
#             print("元组中有空内容！")
#     return
# s = 'sadassad '
# l = ['',1,2,3]
# z = ('l',1,2,'s')
# is_haveempty(s,l,z)

# #4.
# def func(list1):
#     if len(list1) > 2:
#         del list1[2::1]
#         return list1
#     else:
#         return list1
# print(func([1,2,3,4]))

# #5.
# def func(list1):
#     l = len(list1)
#     new_list = []
#     for i in range(1,l,2):
#         new_list.append(list1[i])
#     return new_list
#
# print(func([1,2,3,4,5,6,7]))
